Dew Math for .NET
|
Numerical gradient by high precision numerical differentiation.
Parameters |
Description |
TRealFunction Fun |
Real function of several variables. |
[In] TVec Pars |
Function variables. |
[In] TVec Consts |
Array of additional constants which can be used in math formula. |
[In] object[] ObjConst |
Array of additional constants (pointers) which can be used in math formula. |
[In] TVec Grad |
Returns calculated gradient. If needed, Grad Length and Complex properties are adjusted automatically. |
Calculates the numerical gradient by high precision numerical differentiation. The algorithm uses Richardson extrapolation of three values of the symmetric difference quotient. The gradient step size is defined by GradStepSize global variable. Normally the optimal stepsize depends on seventh partial derivatives of the function. Since they are not available, the initial value for GradientStepSize is Exp(Ln(EPS)/7)*0.25, as suggested by Spellucci.
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
|
What do you think about this topic? Send feedback!
|